package com.timo.redis.controller;

import com.timo.redis.send.HelloSending;
import com.timo.redis.util.Result;
import org.springframework.data.redis.listener.ChannelTopic;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: 类的详细说明
 * @Author: timo
 * @Date: 2019/8/28 18:00
 */
@RestController
@RequestMapping("/send")
public class RedisSendController {

    @Resource
    private HelloSending helloSending;

    private ChannelTopic topic = new ChannelTopic("/redis/pubsub");


    @GetMapping("/hello")
    public Result hello() {
        helloSending.hello();
        return Result.success("发送成功");
    }
}
